package com.zenagro.domain.zenagro;

// No beginning comment snippet from this extension MP-MANAGED-ADDED-AREA-BEGINNING @import@// No ending comment snippet from this extension 
// No beginning comment snippet from this extension MP-MANAGED-ADDED-AREA-ENDING @import@// No ending comment snippet from this extension 
import java.sql.*;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;

import javax.persistence.*;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import org.openxava.annotations.*;

import com.zenagro.domain.zenagro.Solucion;
import com.zenagro.domain.zenagro.Cultivo;
import com.zenagro.domain.zenagro.base.*;


/**
 *
 * <p>Title: AnalisisSolucionCultivo</p>
 *
 * <p>Description: Domain Object describing a AnalisisSolucionCultivo entity</p>
 *
 */

@Entity (name="AnalisisSolucionCultivo")
@Table (name="analisis_solucion_cultivo")
@Views({
@View(members=" solucionId  ; cultivoId  ; file  ; "),	
	
@View(
		name="base",
		members=" solucionId  ; cultivoId  ; file  ; "),	
	@View(
		name="DEFAULT", 
		extendsView="base"
       
	),
   
  @View(name="reference", 
       extendsView="base"
  )
})

@Tabs({@Tab(properties= " file "),
	@Tab(name="reference", properties="file")})
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class AnalisisSolucionCultivo extends FileIdentificable{

	@Required
    @ManyToOne //(fetch=FetchType.LAZY ,optional=false) Parece que el lazy da algun problema con JPaCloner!!!!
    @JoinColumn(name="solucion_id", referencedColumnName = "id", nullable=false,  unique=false )
    @ReferenceView ("reference")
    private Solucion solucionId;
    
    @Required
    @ManyToOne //(fetch=FetchType.LAZY ,optional=false) Parece que el lazy da algun problema con JPaCloner!!!!
    @JoinColumn(name="cultivo_id", referencedColumnName = "id", nullable=false,  unique=false )
    @ReferenceView ("reference")
  
    private Cultivo cultivoId;

	public Solucion getSolucionId() {
		return solucionId;
	}

	public void setSolucionId(Solucion solucionId) {
		this.solucionId = solucionId;
	}

	public Cultivo getCultivoId() {
		return cultivoId;
	}

	public void setCultivoId(Cultivo cultivoId) {
		this.cultivoId = cultivoId;
	}

}
